package com.xixing.weixin.domain;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.roo.addon.dod.RooDataOnDemand;

@RooDataOnDemand(entity = Account.class)
public class AccountDataOnDemand {
    @Autowired
    private SchoolDataOnDemand schoolDataOnDemand;

    public void initDB() {
        schoolDataOnDemand.initDB();
        Account account = new Account();
        account.setSchool(School.findSchoolsByWeixinCode("gzhu_pig").getSingleResult());
        account.setWeixinCode("1234");
        account.setStartYear(2011);
        account.setStudentCode("1115100089");
        account.setStudentPassword("151833");
        account.persist();
    }
}
